package mode

import (
	"gorm.io/gorm"
	"time"
)

type Db_cost struct {
	gorm.Model
	RoomId      uint      `json:"room_id" gorm:"index;comment:'关联的房间ID'" form:"room_id" binding:"required" required_msg:" room_id 为必填项目" validate:"required"`
	Power       float64   `json:"power" gorm:"type:decimal(10,2);comment:'电表跑数，decimal类型，用于记录电表的读数。'" form:"power" binding:"required" required_msg:" power 为必填项目" validate:"required"`
	Water       float64   `json:"water" gorm:"type:decimal(10,2);comment:'水表跑数，decimal类型，用于记录水表的读数。'" form:"water" binding:"required" required_msg:" water 为必填项目" validate:"required"`
	Record_time time.Time `json:"record_time" gorm:"type:datetime;comment:'用于记录电表的读数月份时间。'" form:"record_time" binding:"required" required_msg:" record_time 为必填项目" validate:"required"`
	Pay_status  int       `json:"pay_status" gorm:"default:0;comment:'如未支付、已支付等'"`
}
